<?php 
include 'core/init.php';
include 'includes/overall/header.php';
 ?>
<div id="body-container">
		<h2><b> Send oss dine treningsprogram!</b></h2><br>
		
		<p id="p_black">Nedenfor kan du sende oss ditt/dine treningsprogram,<br>
						så vil vi sørge for at andre får tilgang til det på websiden.<br>
__________________________________________________________________________<br>
<?php 
$action = $_REQUEST['action']; 
if ($action=="")    /* display the contact form */ 
    { 
    ?> 
    <form  action="" method="POST" enctype="multipart/form-data"> 
    <input type="hidden" name="action" value="submit"> 
    Navn:<br> 
    <input name="name" type="text" value="" size="30"/><br> 
    Email:<br> 
    <input name="email" type="text" value="" size="30"/><br> 
    Treningsprogram:<br> 
    <textarea name="message" rows="7" cols="30">Egnet for:

Type treningsprogram:

Treningsprogramet:
</textarea><br> 
    <input id="button1" type="submit" value="Send email"/> 
    </form> 

    <?php 
    }  
else                /* send the submitted data */ 
    { 
    $name=$_REQUEST['name']; 
    $email=$_REQUEST['email']; 
    $message=$_REQUEST['message']; 
    if (($name=="")||($email=="")||($message=="")) 
        { 
        echo "<b><br>Vennligst fyll ut alle felt. Fyll ut <a href=\"\">skjemaet</a> på nytt.</b>"; 
        } 
    else{         
        $from="From: $name<$email>\r\nReturn-path: $email"; 
        $subject="Email sendt"; 
        mail("nashout.info@gmail.com", $subject, $message, $from); 
        echo '<b><br>Takk for ditt bidrag!</b><br><img src="img/Symbol_thumbs_up.png" width="100" height="130"><br>'; 
        } 
    }   
?> 
__________________________________________________________________________<br>
</div>
<?php include 'includes/overall/footer.php'; ?>